package com.example.gitproject.Entity;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

@Data
@Entity
@Table(name = "book")
public class Book implements Serializable {
   //存储数据的时候  序列化   把数据存储序列排序      反序列化   能把数据恢复还原

    public Book(Integer id, String name, String author, String press, String status , String tupian) {
        this.id = id;
        this.name = name;
        this.author = author;
        this.press = press;
        this.status = status;
        this.tupian = tupian;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    private String name;
    private String author;
    private String press;
    private String status;

    private String tupian;

    public Book(){

    }
}
